/* eslint-disable @typescript-eslint/no-unused-vars */
import { BasicColumn, BasicTable, FormSchema, useTable } from "@/components/Table";
import "./index.less";
import { useTranslation } from "react-i18next";
import ToolBar from "@/components/ViewComponents/Toolbar";
import data from "./data.json";

const index = () => {
	const { t } = useTranslation();
	const searchFormSchema: FormSchema[] = [
		{
			label: t("kevin_ui.from_date"),
			field: "fromDate",
			component: "DatePicker"
		},
		{
			label: t("kevin_ui.to"),
			field: "to",
			component: "DatePicker"
		}
	];
	const columns: BasicColumn[] = [
		{
			title: t("kevin_ui.content"),
			dataIndex: "content"
		},
		{
			title: "City",
			dataIndex: "city"
		},
		{
			title: "Province",
			dataIndex: "province"
		},
		{
			title: "Total",
			dataIndex: "total"
		}
	];

	const [registerTable] = useTable({
		dataSource: data,
		columns,
		useSearchForm: true,
		formConfig: {
			schemas: searchFormSchema,
			labelWidth: 100,
			showActionButtonGroup: true,
			actionColOptions: { span: 24 }
		}
	});

	return (
		<div className="page medicalExaminationBook">
			<div className="page-content">
				<BasicTable register={registerTable}></BasicTable>
			</div>
			<ToolBar btnList={[{ key: "print", disabled: true }]}></ToolBar>
		</div>
	);
};
export default index;
